package consumer.lunch;

import common.api.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @ClassName AppLunch
 * @Description
 * @Author Jingxiao.Ye
 * @Date 2022/1/3 下午10:21
 * @Version V1.0
 * @Since JDK 11
 */
@Component
public class AppLunch implements ApplicationRunner {

    @Autowired
    private HelloService helloService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        String hello = helloService.hello();
        System.out.println(hello);
    }
}
